package com.bwie.controller;

import com.bwie.pojo.Sku;
import com.bwie.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: day0423-pxx
 * @ClassName SkuController
 * @description:
 * @author: 段阳
 * @create: 2024-05-06 11:49
 **/
@RestController
@RequestMapping("/item/sku")
public class SkuController {

    @Autowired
    private SkuService skuService;


    @GetMapping("/list")
    public ResponseEntity<List<Sku>> findSkuList(@RequestParam Long id){
        List<Sku> list = skuService.findSkuList(id);
        return ResponseEntity.ok(list);
    }

}